<?php
/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2018/3/23
 * Time: 13:20
 */

namespace app\api\controller\v1;

use app\common\lib\exception\ApiException;
use think\Db;
use app\api\model\Classroom as M;

class Classroom extends Common
{
    /**
     * @获取 教室信息列表
     * @author 巫玉梅 <1120504614@qq.com>
     * @return ApiException|array|string|\think\response\Json
     */
    public function index(){
        $classroom = (new M())->getAllClassroom();
        return $classroom;
    }
    /**
     * @ 查询某人推荐教室记录或者查询某人所拥有的教室记录
     * @param id int 用户id 必传
     * @param status int  1 查询某人推荐的教室记录 2查询某人所拥有的教室记录
     * @author 巫玉梅 <1120504614@qq.com>
     * @return ApiException|array|string|\think\response\Json
     */
    public function get_rec_or_own_classroom(){
        $result = (new M())->recOrOwnClassroom();
        return $result;
    }
}